<?php require VIEW_ROOT.'/common/header.php'?>

<script>
$(function() {
    $('.item').hover(function() {
        $(this).find('.op').show();
    }, function() {
        $(this).find('.op').hide();
    });
});
</script>

<style>
.total, .time { font-size:10px; margin-left:3px; }
.note { }
.caseitem { white-space:nowrap; margin:8px; line-height:30px; background:#1f5b98; padding:1px 7px 2px 7px; border-radius:5px; }
.caseitem { color:#eee; text-decoration:none; }
.caseitem a:hover { text-decoration:none; }
.op { display:none; font-size:12px; color:#cc0000; }
.date { width:300px; padding:4px 0 0 20px; border-radius:3px; height:22px; color:#fff; font-size:12px; background:#c00; word-spacing:3px; }
.date b { font-size:16px; }
</style>

<div class="info">
    [
	<a href="./?m=case">所有</a>
    /
	<a href="./?m=case&a=add">添加事例</a>
    ]
    &nbsp;
    共展示了<?php echo $total; ?>项
</div>

<!-- start.事例列表 -->
<?php foreach ($dailyData as $key => $row) : ?>
<div class="date">
    <b><?php echo date('n月j日', $key); ?></b>
    星期<?php echo library_common::get_week_name($key); ?>
    (共<?php echo count($row)?>项)
</div>
<table>
    <?php foreach ($row as $row2) : ?>
    <tr>
        <td width="80" style="color:#777;">
            <span class="time"><?php echo library_common::get_time_name($row2['time']).date('H:i', $row2['time'])?></span>
        </td>
        <td class="frm item">
            <span class="caseitem"><?php echo $row2['name']; ?></span>
            <?php echo $row2['note']; ?>
            <span class="op">
                <a href="?m=case&name=<?php echo $row2['name']; ?>">搜索</a>
                /
                <a href="?m=case&a=add_do&name=<?php echo $row2['name']; ?>" onclick="return confirm('确定要添加?');">添加</a>
                /
                <a href="?m=case&a=edit&id=<?php echo $row2['id']; ?>">编辑</a>
                /
                <a href="?m=case&a=delete&id=<?php echo $row2['id']; ?>" onclick="return confirm('确定要删除?');">删除</a>
            </span>
        </td>
    </tr>
    <?php endforeach; ?>
</table>
<?php endforeach; ?>
<!-- end.事例列表 -->

<?php require VIEW_ROOT.'/common/footer.php'?>
